#include "NamedPipe.hpp"

std::string GetInfo() {
    static int cnt = 0;
    std::string message = "Hello, I am client";
    message += std::to_string(cnt);
    pid_t id = getpid();
    message += " my pid is ";
    message += std::to_string(id);
    cnt++;
    return message;
}

int main() {
    NamedPipe fifo(ComPath, NPUser);

    while (true) {
        std::string info;
        std::cout << "Please Enter > ";
        std::cin >> info;
        fifo.SomeoneUseForWrite(info);
        sleep(1);
    }

    return 0;
}

